import request from '@/sheep/request';

export default {
  // get 实例
  // profile: (data) =>
  //   request({
  //     url: 'user.user/profile',
  //     method: 'GET',
  //     custom: {
  //       showLoading: false,
  //       auth: true,
  //       showSuccess: true,
  //     },
  //   }),
  // post 实例
  // profile: (data) =>
  //   request({
  //     url: 'user.user/profile',
  //     method: 'POST',
  //     data,
  //     custom: {
  //       showLoading: false,
  //       auth: true,
  //       showSuccess: true,
  //     },
  //   }),

  //api/brand/goodsshow
  // 商品详情
  goodsShow: (params) =>
    request({
      url: '/api/brand/goodsshow',
      method: 'GET',
      params,
      custom: {
        yy: 1,
      },
    }),

  // {{url}}/api/brand/goodsupdown
  // 商品上下架
  goodsUpDown: (data) =>
    request({
      url: '/api/brand/goodsupdown',
      method: 'POST',
      data,
      custom: {
        showLoading: false,
        auth: true,
        showSuccess: true,
        yy: 1,
      },
    }),

  // 首页文章列表
  articleList: (data) =>
    request({
      url: 'api/index/articlelist',
      method: 'POST',
      data,
      custom: {
        yy: 1,
      },
    }),

  // 商品分类
  categoryList: (params) =>
    request({
      url: 'api/brand/goodscategory',
      method: 'GET',
      params,
      custom: {
        yy: 1,
      },
    }),

  // api/brand/gooodslist 商品列表
  goods: (params) =>
    request({
      url: '/api/goods/goods',
      method: 'GET',
      params,
      custom: {
        yy: 1,
      },
    }),
  // 会长名称 /api/goods/hzname
  hzname: (params) =>
    request({
      url: 'api/goods/hzname',
      method: 'GET',
      params,
      custom: {
        yy: 1,
      },
    }),
  // api/index/config 配置
  config: (params) =>
    request({
      url: 'api/index/config',
      method: 'GET',
      params,
      custom: {
        yy: 1,
      },
    }),

  ///api/store/apply 门店入驻
  applyStore: (data) =>
    request({
      url: '/api/store/apply',
      method: 'POST',
      data,
      custom: {
        yy: 1,
      },
    }),

  ///api/brand/apply 申请品牌
  applyBrand: (data) =>
    request({
      url: '/api/brand/apply',
      method: 'POST',
      data,
      custom: {
        yy: 1,
      },
    }),

  // /api/store/typelist 门店分类
  typeList: (params) =>
    request({
      url: '/api/store/typelist',
      method: 'GET',
      params,
      custom: {
        yy: 1,
      },
    }),

  ///api/store/storelist 门店列表
  storeList: (params) =>
    request({
      url: '/api/store/storelist',
      method: 'GET',
      params,
      custom: {
        yy: 1,
      },
    }),

  // /api/mshop/user/user/sharedata 我的粉丝
  fans: (params) =>
    request({
      url: '/api/mshop/user/user/sharedata',
      method: 'GET',
      params,
      custom: {
        yy: 1,
      },
    }),
  // /api/brand/applyshow
  applyShow: (params) =>
    request({
      url: '/api/brand/applyshow',
      method: 'GET',
      params,
      custom: {
        yy: 1,
        showError: false,
      },
    }),
  // api/brand/applyedit
  applyEdit: (data) =>
    request({
      url: '/api/brand/applyedit',
      method: 'POST',
      data,
      custom: {
        yy: 1,
      },
    }),

  // api/brand/gooodslist
  goodsList: (params) =>
    request({
      url: '/api/brand/gooodslist',
      method: 'GET',
      params,
      custom: {
        yy: 1,
      },
    }),
  // api/brand/goodscategory
  goodscategory: (params) =>
    request({
      url: '/api/brand/goodscategory',
      method: 'GET',
      params,
      custom: {
        yy: 1,
      },
    }),
  // /api/brand/goodsadd
  goodsAdd: (data) => {
    console.log('🚀 ~ data:', data);
    return request({
      url: '/api/brand/goodsadd',
      method: 'POST',
      data,
      custom: {
        yy: 1,
      },
    });
  },
  //{{url}}/api/brand/goodsedit
  // 商品编辑
  goodsEdit: (data) =>
    request({
      url: '/api/brand/goodsedit',
      method: 'POST',
      data,
      custom: {
        yy: 1,
      },
    }),

  // {{url}}/api/brand/orderlist
  // 订单列表
  orderList: (params) =>
    request({
      url: '/api/brand/orderlist',
      method: 'GET',
      params,
      custom: {
        yy: 1,
      },
    }),

  //{{url}}/api/brand/express
  // 快递公司
  express: (params) =>
    request({
      url: '/api/brand/express',
      method: 'GET',
      params,
      custom: {
        yy: 1,
      },
    }),

  // {{url}}/api/brand/orderdispatch
  // 订单发货
  orderDispatch: (data) =>
    request({
      url: '/api/brand/orderdispatch',
      method: 'POST',
      data,
      custom: {
        yy: 1,
      },
    }),

  // /api/store/storeevaluate
  // 发布评论
  storeEvaluate: (data) =>
    request({
      url: '/api/store/storeevaluate',
      method: 'POST',
      data,
      custom: {
        yy: 1,
      },
    }),

  //{{url}}/api/store/storeevaluatelist
  // 评论列表
  storeEvaluateList: (params) =>
    request({
      url: '/api/store/storeevaluatelist',
      method: 'GET',
      params,
      custom: {
        yy: 1,
      },
    }),

  ///api/store/myapply
  // 我的申请
  myApply: (params) =>
    request({
      url: '/api/store/myapply',
      method: 'GET',
      params,
      custom: {
        yy: 1,
        showSuccess: false,
      },
    }),

  // {{url}}/api/mshop/user/user/data
  // 我的信息
  myInfo: (params) =>
    request({
      url: '/api/mshop/user/user/data',
      method: 'GET',
      params,
      custom: {
        yy: 1,
      },
    }),

  // {{url}}/api/index/articleshow
  // 文章详情
  articleShow: (params) =>
    request({
      url: '/api/index/articleshow',
      method: 'GET',
      params,
      custom: {
        yy: 1,
      },
    }),

  // /api/store/storeshow
  // 店铺详情
  storeShow: (params) =>
    request({
      url: '/api/store/storeshow',
      method: 'GET',
      params,
      custom: {
        yy: 1,
        showError: false,
      },
    }),

  // {{url}}/api/brand/statistics
  // 店铺统计
  storeStatistics: (params) =>
    request({
      url: '/api/brand/statistics',
      method: 'GET',
      params,
      custom: {
        yy: 1,
      },
    }),

  // {{url}}/api/user/gpinfo
  // 我的分组
  gpInfo: (params) =>
    request({
      url: '/api/user/gpinfo',
      method: 'GET',
      params,
      custom: {
        yy: 1,
      },
    }),
  //{{url}}/api/user/gpwithdraw
  // 分组提现
  gpWithdraw: (data) =>
    request({
      url: '/api/user/gpwithdraw',
      method: 'POST',
      data,
      custom: {
        yy: 1,
      },
    }),

  // {{url}}/api/user/gplog
  // 分组日志
  gpLog: (params) =>
    request({
      url: '/api/user/gplog',
      method: 'GET',
      params,
      custom: {
        yy: 1,
      },
    }),
  //{{url}}/api/user/userauth
  // 认证
  userAuth: (data) =>
    request({
      url: '/api/user/userauth',
      method: 'POST',
      data,
      custom: {
        yy: 1,
      },
    }),

  //{{url}}/api/user/authinfo
  // 认证信息
  authInfo: (params) =>
    request({
      url: '/api/user/authinfo',
      method: 'GET',
      params,
      custom: {
        yy: 1,
      },
    }),
  // /api/shop/apply
  // 店铺申请
  shopApply: (data) =>
    request({
      url: '/api/shop/apply',
      method: 'POST',
      data,
      custom: {
        yy: 1,
      },
    }),

  //{{url}}/api/pay/pay
  // 支付
  pay: (data) =>
    request({
      url: '/api/pay/pay',
      method: 'POST',
      data,
      custom: {
        yy: 1,
      },
    }),

  //{{url}}/api/shop/applyshow
  // 店铺申请详情
  shopApplyShow: (params) =>
    request({
      url: '/api/shop/applyshow',
      method: 'GET',
      params,
      custom: {
        yy: 1,
        showError: false,
      },
    }),

  // {{url}}/api/shop/applyedit
  // 店铺申请编辑
  shopApplyEdit: (data) =>
    request({
      url: '/api/shop/applyedit',
      method: 'POST',
      data,
      custom: {
        yy: 1,
      },
    }),

  // {{url}}/api/shop/statistics
  // 店铺统计
  shopStatistics: (params) =>
    request({
      url: '/api/shop/statistics',
      method: 'GET',
      params,
      custom: {
        yy: 1,
      },
    }),

  //{{url}}/api/shop/orderlist
  // 店铺订单列表
  shopOrderList: (params) =>
    request({
      url: '/api/shop/orderlist',
      method: 'GET',
      params,
      custom: {
        yy: 1,
      },
    }),
  //{{url}}/api/shop/goodsupdown
  // 商品上下架
  goodsUpDownShop: (data) =>
    request({
      url: '/api/shop/goodsupdown',
      method: 'POST',
      data,
      custom: {
        yy: 1,
      },
    }),
  // {{url}}/api/live/videolist
  // 视频列表
  videoList: (params) =>
    request({
      url: '/api/live/videolist',
      method: 'GET',
      params,
      custom: {
        yy: 1,
      },
    }),

  // /{{url}}/api/live/addvideo
  // 上传视频
  addVideo: (data) =>
    request({
      url: '/api/live/addvideo',
      method: 'POST',
      data,
      custom: {
        yy: 1,
      },
    }),

  // {{url}}/api/shop/applyinfo
  // 店铺申请信息
  shopApplyInfo: (params) =>
    request({
      url: '/api/shop/applyinfo',
      method: 'GET',
      params,
      custom: {
        yy: 1,
      },
    }),
  //{{url}}/api/live/livelist
  // 直播列表
  liveList: (params) =>
    request({
      url: '/api/live/livelist',
      method: 'GET',
      params,
      custom: {
        yy: 1,
      },
    }),
  //{{url}}/api/user/propertyinfo
  // 资产信息
  propertyInfo: (params) =>
    request({
      url: '/api/user/propertyinfo',
      method: 'GET',
      params,
      custom: {
        yy: 1,
      },
    }),
  // {{url}}/api/index/app
  // app热更新
  appUpdate: (params) =>
    request({
      url: '/api/index/app',
      method: 'GET',
      params,
      custom: {
        yy: 1,
      },
    }),

  // {{url}}/api/shop/goodsbrand
  // 商品品牌
  goodsBrand: (params) =>
    request({
      url: '/api/shop/goodsbrand',
      method: 'GET',
      params,
      custom: {
        yy: 1,
      },
    }),

  //{{url}}/api/shop/goodsadd
  // 商品添加
  goodsAdds: (data) =>
    request({
      url: '/api/shop/goodsadd',
      method: 'POST',
      data,
      custom: {
        yy: 1,
      },
    }),
  //{{url}}/api/live/addlive
  // 直播添加
  liveAdd: (data) =>
    request({
      url: '/api/live/addlive',
      method: 'POST',
      data,
      custom: {
        yy: 1,
      },
    }),

  //{{url}}/api/shop/gooodslist
  // 商品列表
  goodsLists: (params) =>
    request({
      url: '/api/shop/gooodslist',
      method: 'GET',
      params,
      custom: {
        yy: 1,
      },
    }),

  // {{url}}/api/index/articletype
  // 文章分类
  articleType: (params) =>
    request({
      url: '/api/index/articletype',
      method: 'GET',
      params,
      custom: {
        yy: 1,
      },
    }),
  // {{url}}/api/shop/goodssync
  // 商品同步
  goodsSync: (data) =>
    request({
      url: '/api/shop/goodssync',
      method: 'POST',
      data,
      custom: {
        yy: 1,
      },
    }),

  // /{{url}}/api/live/power
  // 直播权限
  livePower: (params) =>
    request({
      url: '/api/live/power',
      method: 'GET',
      params,
      custom: {
        yy: 1,
      },
    }),
};
